//index.js
//获取应用实例
const app = getApp()
 const Api = require("../../utils/api.js").API
// const Store = require("../../utils/store.js").store
// const codeZ = require("../../utils/util.js")
Page({
    data: {
       list:[],
       heizhi:200,
       fenzhu:true,
    },
    onLoad(option) {
       
        if(option.hasOwnProperty('item')){
            console.log(option);
            this.setData({
                fenzhu:option.item
            })
        }
       
    },
    onShow: function() {
        this.setData({
             heizhi:(app.globalData.screenHeight-300),
            
             
        })
      let that = this;
     Api.cheakGroupApi().then(res=>{
         if(res.code == 0){
             
             that.setData({
                 list:res.data.groupInfo
             })
         }else{
             that.setData({
                 list:[]
             })
         }
     })
    },
    // clickDe:function(){
    //     wx.navigateTo({
    //         url: '../shouDaoDetail/index',
    //     })
    // },
    clickExcel:function(){
        wx.navigateTo({
            url: '../MyExcel/index',
        })
    },
    clickTag:function(){
        wx.navigateTo({
            url: '../MyTags/index',
        })
    },
    clickNew:function(){
        let a = this.data.fenzhu;
        wx.navigateTo({
            url: '../adressEdit/index?fenzhu='+a,
        })
        
    },
    bianji:function(e){
        console.log(e);
        var str = e.currentTarget.dataset.item
         var lxNo = e.currentTarget.dataset.lxno
          var lxName = e.currentTarget.dataset.lxname
        let dic = JSON.stringify({
            'item':str,
            'lxNo':lxNo,
            'lxName':lxName
        })
        wx.navigateTo({
              url: '../adressEdit/index?item='+ dic})
              
       
    },
  

});
